package com.zhangtai.modules.service.dimission;

import com.zhangtai.modules.entity.employee.DimissionAuditEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;


/**
 * 离任审计通知
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-09-02 09:47:33
 */

public interface DimissionAuditService {

    @GetMapping("/findDimissionAuditList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage(@RequestParam(value = "keyword", required = false) String keyword,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    public  List<Map<String,Object>>  queryPageList(
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "code", required = false) String code,
            @RequestParam(value = "hiredateStart", required = false) String hiredateStart,
            @RequestParam(value = "hiredateEnd", required = false) String hiredateEnd,
            @RequestParam(value = "jobLevelId", required = false) Long jobLevelId, //职级id
            @RequestParam(value = "lineId", required = false) Long lineId, //专业职级id
            @RequestParam(value = "jobSystemId", required = false) Long jobSystemId, //专业职级id
            @RequestParam(value = "status", required = false) Integer status, //审批状态
            @RequestParam(value = "upcomingStatus", required = false) Integer upcomingStatus, //审计待办状态
            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
            @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    public  PageResult getDimissionAuditPageList(
            @RequestParam(value = "orgIds",required = false) List<Long> orgIds,
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "code", required = false) String code,
            @RequestParam(value = "hiredateStart", required = false) String hiredateStart,
            @RequestParam(value = "hiredateEnd", required = false) String hiredateEnd,
            @RequestParam(value = "jobLevelId", required = false) Long jobLevelId, //职级id
            @RequestParam(value = "lineId", required = false) Long lineId, //专业职级id
            @RequestParam(value = "jobSystemId", required = false) Long jobSystemId, //专业职级id
            @RequestParam(value = "status", required = false) Integer status, //审批状态
            @RequestParam(value = "upcomingStatus", required = false) Integer upcomingStatus, //审计待办状态
            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
            @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);


    @GetMapping("/infoDimissionAudit")
    @ApiOperation(value = "根据id查找")
    DimissionAuditEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveDimissionAudit")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody DimissionAuditEntity entity);

    @PostMapping("/updateDimissionAudit")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody DimissionAuditEntity entity);

    @GetMapping("/deleteOneDimissionAudit")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteDimissionAudits")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

